function saveLKT(filepath, rid_grid, aid_grid)
    real_data = single(rid_grid);
    imag_data = -1*single(aid_grid);

    real_data = real_data';
    imag_data = imag_data';
    data = [real_data(:), imag_data(:)];
    data = data';

    fid = fopen(filepath, "wb");
    if fid == -1
        error('cannot open: %s', filepath);
    end
    fwrite(fid, data, "single", 0, "b");

    fclose(fid);
end
